rivers = { 'nile': 'egypt', 'changjiang': 'china', 'huanghe': 'china'}

for river, country in rivers.items():
    print(f"The {river} runs through {country}.")

for river in set(rivers.keys()):
    print(f"{river}")

for country in set(rivers.values()):
    print(f"{country}")